<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>楼栋数据配置</title>
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../public/css/app.css" media="all" />
    <link rel="stylesheet" href="../public/css/doc.css" media="all">
    <link rel="stylesheet" href="../public/css/message.css" media="all">
    <link rel="stylesheet" href="../public/css/nprogress.css" media="all">
</head>

<body>
	<div class="kit-doc" style="padding:10px;">
   		<blockquote class="layui-elem-quote layui-text">楼栋数据配置</blockquote>
    </div>
    <div class="kit-table" style="margin-left:10px;margin-right:10px;">
	    <form class="layui-form" lay-filter="kit-search-form">
	        <div class="kit-table-header">
	            <div class="kit-search-btns">
	            	<a href="javascript:;" data-action="add" class="layui-btn layui-btn-small"><i class="layui-icon">&#xe608;</i> 新增</a>
	                <a href="javascript:;" data-action="del-bulk" class="layui-btn layui-btn-small layui-btn-danger"><i class="layui-icon">&#xe640;</i> 批量删除</a>
	            </div>
	            <div class="kit-search-inputs">
	                <div class="kit-search-keyword">
	                    <input type="text" class="layui-input" name="commentContent" placeholder="搜索.." />
	                    <button lay-submit lay-filter="search"><i class="layui-icon">&#xe615;</i></button>
	                </div>
	            </div>
	        </div>
	        <div class="kit-search-mored layui-anim layui-anim-upbit">
	            <div class="kit-search-body">
	                <div class="layui-form-item">
	                	<div class="layui-inline">
	                        <label class="layui-form-label">邮箱</label>
	                        <div class="layui-input-inline">
	                            <input type="text" name="email" autocomplete="off" class="layui-input">
	                        </div>
	                    </div>
	                    <div class="layui-inline">
	                        <label class="layui-form-label">手机</label>
	                        <div class="layui-input-inline">
	                            <input type="tel" name="mobile" placeholder="请输手机号" autocomplete="off" class="layui-input">
	                        </div>
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                    <div class="layui-inline">
		                    <label class="layui-form-label">状态</label>
		                    <div class="layui-input-inline">
		                        <select name="status" lay-filter="aihao">
		                            <option value="" selected=""></option>
		                            <option value="1">正常</option>
		                            <option value="0">禁用</option>
		                        </select>
		                    </div>
		                </div>
	                </div>
	            </div>
	            <div class="kit-search-footer">
	                <button type="reset" class="layui-btn layui-btn-small layui-btn-primary kit-btn">重置</button>
	                <button lay-submit lay-filter="search" class="layui-btn layui-btn-small kit-btn">确定</button>
	            </div>
	        </div>
	    </form>
	    <div class="kit-table-body">
	        <table id="demo" lay-filter="demo"></table>
	        <script type="text/html" id="barDemo">
            	<a class="layui-btn layui-btn-mini" lay-event="edit">编辑</a>
            	<a class="layui-btn layui-btn-danger layui-btn-mini" lay-event="del">删除</a>
        	</script>
	    </div>
	</div>
	
	<script type="text/html" id="statustpl">
		{{#  if(d.status == 1){ }}
  			<div class="layui-table-cell laytable-cell-1-status"><span style="color: #90EE90;">正常</span></div>
		{{#  } else { }}
			<div class="layui-table-cell laytable-cell-1-status"><span style="color: #FF6A6A;">禁用</span></div>
		{{#  } }}
	</script>
	
	<script type="text/html" id="edit-tpl">
    	<div style="margin:10px">
        	<form class="layui-form" action="" lay-filter="form-edit">
				{{# if(d.building.id!=""){}}
					<input type="hidden" name="id" value="{{d.building.id}}" />
				{{#};}}
            	<div class="layui-form-item">
                	<label class="layui-form-label">楼栋网格编号</label>
                	<div class="layui-input-block">
                    	<input type="text" name="gridId" required lay-verify="required" value="{{d.building.gridId}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋层数</label>
                	<div class="layui-input-block">
                    	<input type="text" name="floors" required lay-verify="required" value="{{d.building.floors}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋每层房间数</label>
                	<div class="layui-input-block">
                    	<input type="text" name="rooms" maxlength="1" required lay-verify="required" value="{{d.building.rooms}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋名称</label>
                	<div class="layui-input-block">
                    	<input type="text" name="name" required lay-verify="required" value="{{d.building.name}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋坐标</label>
                	<div class="layui-input-block">
                    	<input type="text" name="marker" required lay-verify="required" value="{{d.building.marker}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋管理员</label>
                	<div class="layui-input-block">
                	<select id="adminName" name="adminName" lay-verify="">
							{{# var item = d.userList;}}
								{{# for(var i=0;i<item.length;i++){}}

									{{# if(d.building.adminName==item[i].userId){}}
										<option value="{{item[i].userId}}" selected >{{item[i].username}}</option>	
									{{# }else{}}
										<option value="{{item[i].userId}}" >{{item[i].username}}</option>	
									{{# }}}
								{{# }}}
						</select>
					</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">楼栋地址</label>
                	<div class="layui-input-block">
                    	<input type="text" name="address" required lay-verify="required" value="{{d.building.address}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">管理员电话</label>
                	<div class="layui-input-block">
                    	<input type="text" name="adminTelphone" required lay-verify="required" value="{{d.building.adminTelphone}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">街道办事处</label>
                	<div class="layui-input-block">
                    	<input type="text" name="street" required lay-verify="required" value="{{d.building.street}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
				<div class="layui-form-item">
                	<label class="layui-form-label">行政区域</label>
                	<div class="layui-input-block">
                    	<input type="text" name="adminstrativeArea" required lay-verify="required" value="{{d.building.adminstrativeArea}}" placeholder="" autocomplete="off" class="layui-input">
                	</div>
            	</div>
            	<div class="layui-form-item" style="display:none;">
                	<div class="layui-input-block">
                    	<button class="layui-btn" lay-submit lay-filter="formEdit">立即提交</button>
                    	<button type="reset" class="layui-btn layui-btn-primary">重置</button>
                	</div>
            	</div>
        	</form>
    	</div>
	</script>
    <script src="../plugins/vue/vue.min.js"></script>
    <script src="../plugins/layui/layui.js"></script>
    <script src="./js/mapbuilding.js"></script>
</body>

</html>